package com.zkthink.ceres.member.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

import static com.zkthink.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

/**
 * @ClassName MemberRefferVO
 * @Description: MemberRefferVO
 * @Author ck
 * @Date 2021/12/6
 * @Version V1.0
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "MemberRefferVO", description = "会员基础信息")
public class MemberRefferVO {
    private static final long serialVersionUID = 1L;

    private Long id;
    /**
     * 会员微信OPENID
     */
    @ApiModelProperty(value = "会员微信OPENID")
    @Length(max = 100, message = "会员微信OPENID长度不能超过100")
    private String openid;

    /**
     * 会员手机号
     */
    @ApiModelProperty(value = "会员手机号")
    @Length(max = 16, message = "会员手机号长度不能超过16")
    private String phone;

    /**
     * 登录密码
     */
    @ApiModelProperty(value = "登录密码")
    @Length(max = 64, message = "登录密码长度不能超过64")
    private String password;

    /**
     * 余额支付密码
     */
    @ApiModelProperty(value = "余额支付密码")
    @Length(max = 100, message = "余额支付密码长度不能超过100")
    private String payPassword;

    /**
     * 会员昵称
     */
    @ApiModelProperty(value = "会员昵称")
    @Length(max = 20, message = "会员昵称长度不能超过20")
    @Excel(name = "会员昵称")
    private String nickname;

    /**
     * 会员头像
     */
    @ApiModelProperty(value = "会员头像")
    @Length(max = 500, message = "会员头像长度不能超过500")
    private String headimg;

    /**
     * 用户类型 1-普通用户 2-商家用户
     */
    @ApiModelProperty(value = "用户类型 1-普通用户 2-商家用户")
    @TableField("user_type")
    private Boolean userType;

    /**
     * 性别
     */
    @ApiModelProperty(value = "性别")
    @Length(max = 2, message = "性别长度不能超过2")
    private String sex;

    /**
     * 会员级别
     */
    @ApiModelProperty(value = "会员级别")
    @TableField("level")
    private Integer level;

    /**
     * 默认收货地址
     */
    @ApiModelProperty(value = "默认收货地址")
    @Excel(name = "默认收货地址")
    private Long addressId;

    /**
     * 会员个性签名
     */
    @ApiModelProperty(value = "会员个性签名")
    @Length(max = 500, message = "会员个性签名长度不能超过500")
    private String remark;

    /**
     * 会员状态0正常 1拉黑
     */
    @ApiModelProperty(value = "会员状态0正常 1拉黑")
    @Excel(name = "会员状态", replace = {"是_true", "否_false", "_null"})
    private Boolean status;

    /**
     * 最后一次登录时间
     */
    @ApiModelProperty(value = "最后一次登录时间")
    @Excel(name = "最后一次登录时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime loginTime;

    /**
     * 登录次数
     */
    @ApiModelProperty(value = "登录次数")
    @Excel(name = "登录次数")
    private Integer loginNum;

    /**
     * 消费总额
     */
    @ApiModelProperty(value = "消费总额")
    @NotNull(message = "消费总额不能为空")
    @Excel(name = "消费总额")
    private Long expendAmount;

    /**
     * 购买次数
     */
    @ApiModelProperty(value = "购买次数")
    @NotNull(message = "购买次数不能为空")
    @Excel(name = "购买次数")
    private Integer buyTimes;

    /**
     * 最近一次购买时间
     */
    @ApiModelProperty(value = "最近一次购买时间")
    @Excel(name = "最近一次购买时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime lastBuyTime;

    /**
     * 积分
     */
    @ApiModelProperty(value = "积分")
    private Long integral;


    @ApiModelProperty(value = "登录用户名")
    @Excel(name = "账户")
    private String account;

    @ApiModelProperty(value = "注册人注册省份")
    @Excel(name = "注册人注册省份")
    private String registerProvince;

    @ApiModelProperty(value = "注册人注册市县")
    @Excel(name = "注册人注册市县")
    private String registerCity;

    @ApiModelProperty(value = "注册人注册区")
    @Excel(name = "注册人注册区")
    private String registerArea;


    @ApiModelProperty(value = "注册人注册省份")
    private String provinceCode;

    /*
     * 所在市代码
     */
    @ApiModelProperty(value = "所在市代码")
    private String cityCode;


    /**
     * 所在区代码
     */
    @ApiModelProperty(value = "所在区代码")
    private String areaCode;

    /**
     * 出生日期
     */
    @ApiModelProperty(value = "出生日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date birthday;
    @ApiModelProperty(value = "微信不同平台客户唯一标识")
    private String unionid;

    @ApiModelProperty(value = "红娘不同级别")
    private Integer matchmakerLevel;
    @ApiModelProperty(value = "资料完整度")
    private BigDecimal infoComplet;

    @ApiModelProperty(value = "情缘值")
    private BigDecimal loveNum;

    @ApiModelProperty(value = "礼物值")
    private BigDecimal giftNum;

    @ApiModelProperty(value = "推荐人id")
    private Long referId;

    @ApiModelProperty(value = "会员vip类型")
    private Integer vipType;

    @ApiModelProperty(value = "咨询师类型")
    private Integer consultantType;


    @ApiModelProperty(value = "是否是加盟店店长")
    private Integer shopManager;

    @ApiModelProperty(value = "客服类型")
    private Integer customerService;

    @ApiModelProperty(value = "充值vip到期时间")
    private LocalDateTime vipTime;

    @ApiModelProperty(value = "经度")
    private String longitude;

    @ApiModelProperty(value = "维度")
    private String latitude;

    @ApiModelProperty(value = "是否在线0:不在线1:在线")
    private Integer onLine;

    @ApiModelProperty(value = "关注数")
    private int concernNum;


    @ApiModelProperty(value = "年级")
    private int age;

    @ApiModelProperty(value = "1:被搜索的关注搜索的")
    private int bySearch;

    @ApiModelProperty(value = "1:搜索的关注被搜索的")
    private int searchBy;

    /**
     * 婚姻状态
     */
    @ApiModelProperty(value = "婚姻状态描述")
    private String marryDesc;

    /**
     * 学历
     */
    @ApiModelProperty(value = "学历")
    private String educationDesc;

}
